import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '博客id',
    align: 'center',
    dataIndex: 'articleId'
   },
   {
    title: '评论内容',
    align: 'center',
    dataIndex: 'commentContent'
   },
   {
    title: '评论用户',
    align: 'center',
    dataIndex: 'userId'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '博客id',
    field: 'articleId',
    component: 'Input',
  },
  {
    label: '评论内容',
    field: 'commentContent',
    component: 'Input',
  },
  {
    label: '评论用户',
    field: 'userId',
    component: 'Input',
  },
  {
    label: '父级节点',
    field: 'pid',
    component: 'JTreeSelect',
    componentProps: {
      dict: "blog_comment,id,id",
      pidField: "pid",
      pidValue: "0",
      hasChildField: "has_child",
    },
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];
